package com.shop.service;

import com.shop.mapper.CollectionMapper;
import com.shop.model.vo.Rsp;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * (Collection)表服务接口
 *
 * @author makejava
 * @since 2020-11-21 12:10:36
 */
@Service
@AllArgsConstructor
public class CollectionService {
    private final CollectionMapper collectionMapper;

    public Rsp collectionCount(int userId) {
        return Rsp.success(collectionMapper.collectionCount(userId));
    }

    public Rsp getCollectionList(int userId) {
        return Rsp.success(collectionMapper.getCollectionList(userId));
    }

    public Rsp addCollection(Integer userId,Integer merchantId) {
        collectionMapper.addCollection(userId,merchantId);
        return Rsp.success(null);
    }
}
